<?php
   include("./dbconn.php");

   $title = $_GET["title"];
   $imgUrl = $_GET["imgUrl"];
   $hot = $_GET["hot"];

   $sql = "insert into midata (title,imgUrl,hot) values ('$title','$imgUrl','$hot')";

    if ($conn->query($sql) === true){
       $data["code"] = 0;
    }else{
      $data["code"] =1;
    }
    $data["addFlag"]= true;
   echo json_encode($data);
?>